package com.pai4j.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 创作者审核类型枚举
 *
 * @author: CYM-pai
 * @date: 2025/11/01
 */
@Getter
@AllArgsConstructor
public enum CreatorAuditTypeEnum {
    
    AUTO(1, "自动审核"),
    MANUAL(2, "人工审核");
    
    private final Integer code;
    private final String desc;
    
    /**
     * 根据code获取枚举
     */
    public static CreatorAuditTypeEnum getByCode(Integer code) {
        if (code == null) {
            return null;
        }
        for (CreatorAuditTypeEnum typeEnum : CreatorAuditTypeEnum.values()) {
            if (typeEnum.getCode().equals(code)) {
                return typeEnum;
            }
        }
        return null;
    }
}




